
/**
 * 登录
 * @returns
 */
function login(){
	var url="../../role/login.action";
	var data=$("#myform").serialize();
	$.post(url,data,function(mes){
		if(mes.state == 1){
			swal({ 
				  title: "登录成功！", 
				  timer: 2000, 
				  showConfirmButton: true 
				},function(){
					location.href = "../index/index.html";
				});
		}else{
			swal("登录失败!","用户名或密码错误!","error");
		}
	},"json");
}